<?php

// If you want to call this example script from a web server via http
// request you need to make the "example" directory world writable 
// (chmod 777) or at least writable for the web server process.

include '../phpwebstorage.class.php';

$storage = new PhpWebStorage( './storage.php' );
$storage->storeSecure = false;

//print_r( $storage );
//exit;

$data = array( 
	array( 'id'=>23, 'city'=>'Berlin' ), 
	array( 'id'=>24, 'city'=>'London' ) 
);

if( $storage->write( $data ) ){
	echo "Data has been written successfully\n";
} else {
	echo "There was an error writing the data\n";
}

print_r( $storage->read() );

?>